package factory.simple;

//简单工厂模式
public class Factory {
    public  static Car getCar(String car){
        if(car.equals("Audi")){
            return new Audi();
        }else if (car.equals("BMW")){
            return  new BMW();
        }else if ((car).equals("Jeep")){
            return new Jeep();
        }else {
            return null;
        }
    }
}
